package com.sy.simpleegg.config

import android.os.Environment
import com.sy.simpleegg.constant.MultPlatform
import com.sy.simpleegg.constant.ProductType
import java.io.File


object Config {

    var CURRENCY_SYMBOLS = "¥"

    var DEFAULT_COUNTRY_CODE = 1

    var REG_EVENT = -1

    val DEF_MEDIA_PATH: String = Environment.getExternalStorageDirectory().absolutePath + File.separatorChar + "whmcy/ad/"

    val DEF_LOGO_PATH: String = Environment.getExternalStorageDirectory().absolutePath + File.separatorChar + "whmcy/logo/"

    val DEF_UPGRADE_PATH: String = Environment.getExternalStorageDirectory().absolutePath + File.separatorChar + "whmcy/upgrade/"

    val PAY_TIMEOUT: Int = 60

    val PAY_RESULT_TIMEOUT: Int = 30

    val TAKE_TIMEOUT: Int = 120

    val DEF_OUTTING_TIMEOUT: Int = 180

    val CONVERSION_RATIO: Int = 100

    var DEFAULT_MONEY_COINS: String = "100,1"//一元一个币

    /**
     * 接入默认平台
     */
    var ACCESS_DEF_MQTT = true

    /**
     * 接入其他平台
     */
    var ACCESS_OTHER_PLATFORM = 1

    /**
     * 控制板
     */
//    var CONTROL_BOARD: ControlBoard = ControlBoard.DEFAULT

    /**
     * 显示购物车
     */
    var SHOW_SHOPCART = true

    /**
     * 显示通道号
     */
    var SHOW_CHANNEL = true

    private val BASE_DISK_PATH = Environment.getExternalStorageDirectory().absolutePath
    var LOG_PATH = BASE_DISK_PATH + File.separatorChar + "logger"
    var DOWNLOAD_PATH = BASE_DISK_PATH + File.separatorChar + "whm_download"

    /**
     * 售卖商品类型（兑币机/售珠机）
     */
    var PRODUCT_TYPE = ProductType.CURRENCY
    /**
     * 开启双平台（WHM属于主平台，开启后WHM注册设备，上报订单出货数据，其他平台属于辅助性质正常处理）
     */
    var OPEN_MULT_PLATFORM = MultPlatform.OPEN
    /**
     * 订单自动补币
     * 开启后设备出币异常时会停止设备运行，并在启动时自动处理未出币订单
     * 关闭后设备出币异常后可以继续正常运行，出币异常订单会记录在后台页面，可以手动选择订单补币
     */
    var ORDER_SUPPLEMENT = true
    /**
     * 设备状态，开启订单自动补币时，需要记录此状态 true-设备正常 false-出币异常
     */
    var DEVICE_STATUS = true
}